package com.samoiloff.ui.btns.simple {
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.text.TextField;

	/**
	 * @author Alexander Slavshik <as.kvint@gmail.com>
	 * created 22.06.2010
	 */
	public class SimpleTextButton extends SimpleButtonController {
		private var _mc:MovieClip;
		private var _tf:TextField;
		private var _caption:String;

		public function SimpleTextButton(mc:MovieClip, handCursor:Boolean = false) {
			_mc = mc;
			_tf = _mc.tf;
//			Fonts.getInstance().applyDefaultFont(_mc.tf);
			super(mc.btn, handCursor);
		}

		override public function get mc():DisplayObject {
			return _mc;
		}

		override public function destroy():void {
			_mc = null;
			_tf = null;
			super.destroy();
		}
		
		public function get caption():String {
			return _caption;
		}
		
		public function set caption(caption:String):void {
			_caption = caption;
			_tf.text = _caption;
		}
	}
}
